import request from '@/utils/request'

// 查询能耗告警记录列表
export function listCaution(query) {
  return request({
    url: '/system/caution/list',
    method: 'get',
    params: query
  })
}

// 查询能耗告警记录详细
export function getCaution(ecId) {
  return request({
    url: '/system/caution/' + ecId,
    method: 'get'
  })
}

// 新增能耗告警记录
export function addCaution(data) {
  return request({
    url: '/system/caution',
    method: 'post',
    data: data
  })
}

// 修改能耗告警记录
export function updateCaution(data) {
  return request({
    url: '/system/caution',
    method: 'put',
    data: data
  })
}

// 删除能耗告警记录
export function delCaution(ecId) {
  return request({
    url: '/system/caution/' + ecId,
    method: 'delete'
  })
}
